package com.qfedu.controller;

import com.qfedu.page.PageResult;
import com.qfedu.page.QueryPageBean;
import com.qfedu.service.ProjectService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author LiJH
 * @date 2023-02-08
 */
@RestController
@RequestMapping("/project")
@Api(value = "工程管理层", description = "ProjectController接口")
public class ProjectController {
    @Autowired
    private ProjectService projectService;

    @PostMapping("findPage")
    @ApiOperation(value = "分页查询工程", notes = "查询",response = PageResult.class)
    @ApiImplicitParam(name = "分页请求实体queryPageBean", value = "当前页，每页大小", required = true, dataType = "com.qfedu.page.QueryPageBean")
    public PageResult findPage(@RequestBody QueryPageBean queryPageBean){
        PageResult pageResult = projectService.findPage(queryPageBean);
        return pageResult;
    }
}